﻿//-----------------------------------------------------------------------
// <copyright file="TokenController.cs" company="SLWY Enterprises">
// * Copyright (C) 2017 四川商旅无忧科技有限公司 版权所有。
// * version : 1.0
// * author  : qinchaoyue
// * FileName: TokenController.cs
// * history : created by qinchaoyue 2017-11-21 01:36:51
// </copyright>
//-----------------------------------------------------------------------

using System.Collections.Generic;
using Slwy.Application.Interfaces;
using Slwy.Core.Entities;

namespace WebApplication.Controllers
{
    using Microsoft.AspNetCore.Cors;
    using Microsoft.AspNetCore.Mvc;
    using Slwy.Mvc.Controller;

    [Route("api/test/carrier")]
    public class CarrierController : SlwyController
    {
        private readonly ICarrierService _carrierService;

        public CarrierController(ICarrierService carrierService)
        {
            _carrierService = carrierService;
        }

        [HttpPost]
        public IActionResult AddCarrier([FromBody] List<CarrierInfo> entities)
        {
            return this.Ok(this._carrierService.AddCarrier(entities));
        }
    }
}
